Reference is hereby made to the following co-pending U.S. patent applications, which are all assigned to the same assignee as the present application: xe2x80x9cSMART COLUMN FOR CONTACT INFORMATION ON PALM-SIZED COMPUTING DEVICES AND METHOD AND APPARATUS FOR DISPLAYING THE SAMExe2x80x9d, having Ser. No. 09/564,515 and filed on May 5, 2000 pending; xe2x80x9cUSER INTERFACE FOR PALM-SIZED COMPUTING DEVICES AND METHOD AND APPARATUS FOR DISPLAYING THE SAMExe2x80x9d, having Ser. No. 09/564,928 and filed on May 4, 2000 pending; xe2x80x9cMETHOD AND APPARATUS FOR PROVIDING CONTEXT MENUS ON A PEN-BASED DEVICExe2x80x9d, having Ser. No. 09/559,694 and filed on Apr. 27, 2000 pending; and xe2x80x9cMETHOD AND APPARATUS FOR PROVIDING RECENT CATEGORIES ON A HAND-HELD DEVICExe2x80x9d, having Ser. No. 09/559,695 and filed on Apr. 27, 2000 pending.
The present invention relates to hand-held electronic devices. In particular, the present invention relates to searching contacts lists in hand-held devices.
On palm-sized devices, such as phones and hand-held computing devices, especially ones with slow keyboards and limited sized screens, finding a contact entry in a list of thousands of entries can be difficult.
Under the prior art, a user can search for a desired contact by scrolling through the list using either a scrollbar or up/down keys to navigate. The up/down keys provide fine granularity control, allowing the user to move through the list one record at a time. However, scrolling through an entire list of contacts using these keys takes too long and is disorienting. The scroll bar, on the other hand, allows the user to move quickly through the list. However, the coarse granularity of the scrollbar often causes the user to flip-flop from too far past the contact to too far before the contact.
In either case, the user is required to do too much thinking while they""re scrolling. Specifically, the user must continually alphabetize their contact relative to the currently displayed list to see whether they should scroll forward or backward. Worse, if the user is looking for a particular first name, their search becomes even more complicated since the contacts in hand-held devices are sorted by last name.
To alleviate these searching problems, some hand-held devices of the prior art allow users to enter a search query into the hand-held device. The device then searches for contact entries that match the query. In some systems, this search is only performed on a single field, making it difficult to locate matches in other fields. Some systems allowed the user to xe2x80x9cjumpxe2x80x9d through the contact list by entering a single character. Thus, by entering xe2x80x9cCxe2x80x9d the user could jump to the first entry that had a last name starting with xe2x80x9cC.xe2x80x9d Such systems only searched one field of the database. In addition, such systems did not filter the search results but simply displayed the portion of the contact list that followed the found entry in the database. As such, these systems usually displayed additional records that did not start with the search letter.
In other systems, the entire contact record is searched. However, full record searching takes a great deal of time because it requires the decompression of each full record in memory. In addition, because the records are sorted on only a single field during a full record search, every record in the database must be searched. This means that as the number of contacts in the list increases, the amount of time needed to search the list increases proportionally. For example, if the number of contacts doubles, the search time for full record searching doubles. Because of this, under some prior art systems, a user with over a thousand contacts would have to wait over 5 seconds to get the results of their search.
The present invention provides a quick searching method for filtering a contact list in a hand-held device. Under the method, upon receiving a search string from a user, a database object is opened that is sorted alphabetically on the first name of each contact. A search is then performed on the sorted list to retrieve the ID""s of the first record in the sorted list and the last record in the sorted list that have a first name that matches the search string. A second database object is then opened that is sorted alphabetically on a xe2x80x9cfiled asxe2x80x9d field. The xe2x80x9cfiled asxe2x80x9d list is then searched to find the first and last records that match the search string. The first name search results and the xe2x80x9cfiled asxe2x80x9d search results are then combined. The records in the combination are then displayed to the user.
Under one embodiment of the invention, the scalability of the searching method is improved by utilizing binary searches or n-ary searches when searching the databases sorted on first and last names.